<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>
<div class="grid_12" style="margin: 0;width:100%">
	<div class="header">
		<h2 style="text-align: left">1、消息内容设定</h2>
	</div>
	<div id="nodeEventAndMessageInfo">
		<form:form id="bpmNodeEventForm" commandName="model"
			cssClass="validate" action="bpm/nodeSetting/save">
			<input type="hidden" name="id" value="${model.id }" />
			<form:hidden path="messageType" />
			<table class="form-table">
				<tr>
					<td class="td1">消息类型：</td>
					<td class="td2"><form:checkboxes items="${messageTypes }"
							path="messageTypes" />
					</td>
				</tr>
				<tr>
					<td class="td1">消息内容：</td>
					<td class="td2">
						<div style="padding:2px 0 ">
							<form:input path="startMessageTitle" cssStyle="width:85%" />
						</div> <form:textarea path="startMessage" cssStyle="height: 90px" /> <isperp:processVariable
							id="startMessageVariable" targetControlId="startMessage"
							processKey="${defKey }"></isperp:processVariable>
						<div>温馨提示：如果发送短信请控制字数在140字以内。</div></td>
				</tr>
				<tr>
					<td class="td1">消息脚本(需要返回Map)：</td>
					<td class="td2" style="padding:5px 0"><form:textarea
							path="startMessageScript" cssClass="mirroreditor" /> <isperp:processVariable
							id="startMessageScriptVariable" useAsScript="true"
							targetControlId="startMessageScript" processKey="${defKey }"></isperp:processVariable>
						<isperp:operate code="WORKFLOW_DAO" title="数据访问实体dao使用说明"></isperp:operate>
					</td>
				</tr>

			</table>
		</form:form>
	</div>
</div>
<div class="grid_12" style="margin: 3px 0;width:100%">
	<div class="header">
		<h2 style="text-align: left">2、消息接收人员设定</h2>
	</div>
	<div id="nodeUserInfo">

		<isperp:grid url="bpm/nodeUser/list?bpmNodeSettingId=${model.id}"
			gridId="nodeUserGrid" gridTitle="${pageTitle}" cusDialogSize="normal"
			cusFormatterActions="true" cusEditUrl="bpm/nodeUser/edit"
			beforeCreateAction="'bpmNodeSettingId=${model.id}'"
			cusDeleteUrl="bpm/nodeUser/delete" showPager="false"
			showSearchbar="false" excelExportUrl="bpm/nodeUser/excelExport"
			ondbClickRowEvent="nodeUserGrid.edit(rowid);">
			<jsp:attribute name="toolbar">
			<button class="nui-mainbtn"
					onclick="javascript:nodeUserGrid.create();">添加消息接收人员</button>
			</jsp:attribute>
			<jsp:body>
					<isperp:column name="id" title="id" hidden="true"></isperp:column>
					<isperp:column name="assignType" title="处理人类型" width="260"
					isFormatterFun="true"
					formatter="switch(cellvalue){ 
						case 0:return '提交人';
						case 1:return '特定角色';
						case 11:return '特定项目的角色';
						case 2:return '特定成员';
						case 3:return '表单内成员帐号';						
						case 4:return '特定部门下所有成员';
						case 5:return '任务处理人'; 
						case 6:return '特定已处理步骤下的处理人';
						default:return cellvalue;
						 }">
					</isperp:column>
			        <isperp:column name="cmpNames" title="分配对象" width="428">
					</isperp:column>
				</jsp:body>
		</isperp:grid>
	</div>
</div>
<isperp:buttonList>
	<button class="submit" onclick="isperp.submitForm(); return false;">
		<span class="icon icon-save"></span>提交
	</button>
</isperp:buttonList>